package com.eblacorp.archive.dao.fn;

import java.beans.IntrospectionException;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

import com.eblacorp.archive.domain.fn.Archivable;
import com.eblacorp.archive.exceptions.NoAttachedFnDocument;
import com.eblacorp.archive.exceptions.NotFnDocumentException;
import com.eblacorp.archive.exceptions.NullValueException;
import com.filenet.api.constants.CheckinType;
import com.filenet.api.util.Id;
public interface GenericFnDao <T extends Archivable> extends Serializable{
	
	public List<T> getByExample(T t,Integer startPage, Integer pageSize, boolean withDocument)	throws IllegalArgumentException, NotFnDocumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, InstantiationException ;
	public T getById(Id id, boolean withContent) throws IllegalArgumentException, InstantiationException, IllegalAccessException, IntrospectionException, InvocationTargetException;
	public T create(T t, File file, CheckinType checkinType) throws IllegalArgumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, NullValueException, IOException;
	public T update(T t, File file, CheckinType checkinType) throws IllegalArgumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, NullValueException, IOException;
	public void delete(T t, boolean allVersion) throws IllegalArgumentException, IntrospectionException, IllegalAccessException, InvocationTargetException, NullValueException;
	public byte[] download(T t) throws NoAttachedFnDocument, IOException;
	public String getWcmJavaViewerUrl(T t);
}
